﻿


using System;
using System.ComponentModel;
using System.Linq;
using System.Runtime.Serialization;

namespace xtra.domain.Subsonic3
{
	[DataContract]
	[KnownType("GetBaseEntityTypes")]
	public class BaseEntity {
		public static Type[] GetBaseEntityTypes() {
			return new Type[] { typeof(Language), typeof(City) };
		}
	}
    
    /// <summary>
    /// A class which represents the aspnet_Paths table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.aspnet_Path 
    /// </summary>
    [DataContract]
	public partial class aspnet_Path:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public aspnet_Path(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnApplicationIdChanging(Guid value);
        partial void OnApplicationIdChanged();
		
		private Guid _ApplicationId;
		[DataMember]
		public Guid ApplicationId { 
		    get{
		        return _ApplicationId;
		    } 
		    set{
		        this.OnApplicationIdChanging(value);
                this.SendPropertyChanging();
                this._ApplicationId = value;
                this.SendPropertyChanged("ApplicationId");
                this.OnApplicationIdChanged();
		    }
		}
		
        partial void OnPathIdChanging(Guid value);
        partial void OnPathIdChanged();
		
		private Guid _PathId;
		[DataMember]
		public Guid PathId { 
		    get{
		        return _PathId;
		    } 
		    set{
		        this.OnPathIdChanging(value);
                this.SendPropertyChanging();
                this._PathId = value;
                this.SendPropertyChanged("PathId");
                this.OnPathIdChanged();
		    }
		}
		
        partial void OnPathChanging(string value);
        partial void OnPathChanged();
		
		private string _Path;
		[DataMember]
		public string Path { 
		    get{
		        return _Path;
		    } 
		    set{
		        this.OnPathChanging(value);
                this.SendPropertyChanging();
                this._Path = value;
                this.SendPropertyChanged("Path");
                this.OnPathChanged();
		    }
		}
		
        partial void OnLoweredPathChanging(string value);
        partial void OnLoweredPathChanged();
		
		private string _LoweredPath;
		[DataMember]
		public string LoweredPath { 
		    get{
		        return _LoweredPath;
		    } 
		    set{
		        this.OnLoweredPathChanging(value);
                this.SendPropertyChanging();
                this._LoweredPath = value;
                this.SendPropertyChanged("LoweredPath");
                this.OnLoweredPathChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<aspnet_Application> aspnet_Applications
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.aspnet_Applications
                       where items.Id == _ApplicationId
                       select items;
            }
        }

        public IQueryable<aspnet_PersonalizationAllUser> aspnet_PersonalizationAllUsers
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.aspnet_PersonalizationAllUsers
                       where items.PathId == _PathId
                       select items;
            }
        }

        public IQueryable<aspnet_PersonalizationPerUser> aspnet_PersonalizationPerUsers
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.aspnet_PersonalizationPerUsers
                       where items.PathId == _PathId
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the Plugins table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.Plugin 
    /// </summary>
    [DataContract]
	public partial class Plugin:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public Plugin(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnIdChanging(int value);
        partial void OnIdChanged();
		
		private int _Id;
		[DataMember]
		public int Id { 
		    get{
		        return _Id;
		    } 
		    set{
		        this.OnIdChanging(value);
                this.SendPropertyChanging();
                this._Id = value;
                this.SendPropertyChanged("Id");
                this.OnIdChanged();
		    }
		}
		
        partial void OnUIDChanging(string value);
        partial void OnUIDChanged();
		
		private string _UID;
		[DataMember]
		public string UID { 
		    get{
		        return _UID;
		    } 
		    set{
		        this.OnUIDChanging(value);
                this.SendPropertyChanging();
                this._UID = value;
                this.SendPropertyChanged("UID");
                this.OnUIDChanged();
		    }
		}
		
        partial void OnURIChanging(string value);
        partial void OnURIChanged();
		
		private string _URI;
		[DataMember]
		public string URI { 
		    get{
		        return _URI;
		    } 
		    set{
		        this.OnURIChanging(value);
                this.SendPropertyChanging();
                this._URI = value;
                this.SendPropertyChanged("URI");
                this.OnURIChanged();
		    }
		}
		
        partial void OnTitleChanging(string value);
        partial void OnTitleChanged();
		
		private string _Title;
		[DataMember]
		public string Title { 
		    get{
		        return _Title;
		    } 
		    set{
		        this.OnTitleChanging(value);
                this.SendPropertyChanging();
                this._Title = value;
                this.SendPropertyChanged("Title");
                this.OnTitleChanged();
		    }
		}
		
        partial void OnDescriptionChanging(string value);
        partial void OnDescriptionChanged();
		
		private string _Description;
		[DataMember]
		public string Description { 
		    get{
		        return _Description;
		    } 
		    set{
		        this.OnDescriptionChanging(value);
                this.SendPropertyChanging();
                this._Description = value;
                this.SendPropertyChanged("Description");
                this.OnDescriptionChanged();
		    }
		}
		
        partial void OnParentIdChanging(int? value);
        partial void OnParentIdChanged();
		
		private int? _ParentId;
		[DataMember]
		public int? ParentId { 
		    get{
		        return _ParentId;
		    } 
		    set{
		        this.OnParentIdChanging(value);
                this.SendPropertyChanging();
                this._ParentId = value;
                this.SendPropertyChanged("ParentId");
                this.OnParentIdChanged();
		    }
		}
		
        partial void OnEntityVersionIdChanging(int? value);
        partial void OnEntityVersionIdChanged();
		
		private int? _EntityVersionId;
		[DataMember]
		public int? EntityVersionId { 
		    get{
		        return _EntityVersionId;
		    } 
		    set{
		        this.OnEntityVersionIdChanging(value);
                this.SendPropertyChanging();
                this._EntityVersionId = value;
                this.SendPropertyChanged("EntityVersionId");
                this.OnEntityVersionIdChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<Plugin> Plugins
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.Plugins
                       where items.Id == _ParentId
                       select items;
            }
        }

        public IQueryable<Plugins_In_Page> Plugins_In_Pages
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.Plugins_In_Pages
                       where items.NodeId == _Id
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the aspnet_PersonalizationAllUsers table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.aspnet_PersonalizationAllUser 
    /// </summary>
    [DataContract]
	public partial class aspnet_PersonalizationAllUser:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public aspnet_PersonalizationAllUser(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnPathIdChanging(Guid value);
        partial void OnPathIdChanged();
		
		private Guid _PathId;
		[DataMember]
		public Guid PathId { 
		    get{
		        return _PathId;
		    } 
		    set{
		        this.OnPathIdChanging(value);
                this.SendPropertyChanging();
                this._PathId = value;
                this.SendPropertyChanged("PathId");
                this.OnPathIdChanged();
		    }
		}
		
        partial void OnPageSettingsChanging(byte[] value);
        partial void OnPageSettingsChanged();
		
		private byte[] _PageSettings;
		[DataMember]
		public byte[] PageSettings { 
		    get{
		        return _PageSettings;
		    } 
		    set{
		        this.OnPageSettingsChanging(value);
                this.SendPropertyChanging();
                this._PageSettings = value;
                this.SendPropertyChanged("PageSettings");
                this.OnPageSettingsChanged();
		    }
		}
		
        partial void OnLastUpdatedDateChanging(DateTime value);
        partial void OnLastUpdatedDateChanged();
		
		private DateTime _LastUpdatedDate;
		[DataMember]
		public DateTime LastUpdatedDate { 
		    get{
		        return _LastUpdatedDate;
		    } 
		    set{
		        this.OnLastUpdatedDateChanging(value);
                this.SendPropertyChanging();
                this._LastUpdatedDate = value;
                this.SendPropertyChanged("LastUpdatedDate");
                this.OnLastUpdatedDateChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<aspnet_Path> aspnet_Paths
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.aspnet_Paths
                       where items.PathId == _PathId
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the Plugins_In_Pages table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.Plugins_In_Page 
    /// </summary>
    [DataContract]
	public partial class Plugins_In_Page:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public Plugins_In_Page(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnIdChanging(int value);
        partial void OnIdChanged();
		
		private int _Id;
		[DataMember]
		public int Id { 
		    get{
		        return _Id;
		    } 
		    set{
		        this.OnIdChanging(value);
                this.SendPropertyChanging();
                this._Id = value;
                this.SendPropertyChanged("Id");
                this.OnIdChanged();
		    }
		}
		
        partial void OnNodeIdChanging(int value);
        partial void OnNodeIdChanged();
		
		private int _NodeId;
		[DataMember]
		public int NodeId { 
		    get{
		        return _NodeId;
		    } 
		    set{
		        this.OnNodeIdChanging(value);
                this.SendPropertyChanging();
                this._NodeId = value;
                this.SendPropertyChanged("NodeId");
                this.OnNodeIdChanged();
		    }
		}
		
        partial void OnParentIdChanging(int? value);
        partial void OnParentIdChanged();
		
		private int? _ParentId;
		[DataMember]
		public int? ParentId { 
		    get{
		        return _ParentId;
		    } 
		    set{
		        this.OnParentIdChanging(value);
                this.SendPropertyChanging();
                this._ParentId = value;
                this.SendPropertyChanged("ParentId");
                this.OnParentIdChanged();
		    }
		}
		
        partial void OnRootPageIdChanging(int value);
        partial void OnRootPageIdChanged();
		
		private int _RootPageId;
		[DataMember]
		public int RootPageId { 
		    get{
		        return _RootPageId;
		    } 
		    set{
		        this.OnRootPageIdChanging(value);
                this.SendPropertyChanging();
                this._RootPageId = value;
                this.SendPropertyChanged("RootPageId");
                this.OnRootPageIdChanged();
		    }
		}
		
        partial void OnEntityVersionIdChanging(int? value);
        partial void OnEntityVersionIdChanged();
		
		private int? _EntityVersionId;
		[DataMember]
		public int? EntityVersionId { 
		    get{
		        return _EntityVersionId;
		    } 
		    set{
		        this.OnEntityVersionIdChanging(value);
                this.SendPropertyChanging();
                this._EntityVersionId = value;
                this.SendPropertyChanged("EntityVersionId");
                this.OnEntityVersionIdChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<UIResource> UIResources
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.UIResources
                       where items.ModuleId == _Id
                       select items;
            }
        }

        public IQueryable<Plugin> Plugins
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.Plugins
                       where items.Id == _NodeId
                       select items;
            }
        }

        public IQueryable<WebPage> WebPages
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.WebPages
                       where items.Id == _RootPageId
                       select items;
            }
        }

        public IQueryable<ContentVersion> ContentVersions
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.ContentVersions
                       where items.Id == _EntityVersionId
                       select items;
            }
        }

        public IQueryable<Plugins_In_Page> Plugins_In_Pages
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.Plugins_In_Pages
                       where items.Id == _ParentId
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the aspnet_PersonalizationPerUser table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.aspnet_PersonalizationPerUser 
    /// </summary>
    [DataContract]
	public partial class aspnet_PersonalizationPerUser:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public aspnet_PersonalizationPerUser(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnIdChanging(Guid value);
        partial void OnIdChanged();
		
		private Guid _Id;
		[DataMember]
		public Guid Id { 
		    get{
		        return _Id;
		    } 
		    set{
		        this.OnIdChanging(value);
                this.SendPropertyChanging();
                this._Id = value;
                this.SendPropertyChanged("Id");
                this.OnIdChanged();
		    }
		}
		
        partial void OnPathIdChanging(Guid? value);
        partial void OnPathIdChanged();
		
		private Guid? _PathId;
		[DataMember]
		public Guid? PathId { 
		    get{
		        return _PathId;
		    } 
		    set{
		        this.OnPathIdChanging(value);
                this.SendPropertyChanging();
                this._PathId = value;
                this.SendPropertyChanged("PathId");
                this.OnPathIdChanged();
		    }
		}
		
        partial void OnUserIdChanging(Guid? value);
        partial void OnUserIdChanged();
		
		private Guid? _UserId;
		[DataMember]
		public Guid? UserId { 
		    get{
		        return _UserId;
		    } 
		    set{
		        this.OnUserIdChanging(value);
                this.SendPropertyChanging();
                this._UserId = value;
                this.SendPropertyChanged("UserId");
                this.OnUserIdChanged();
		    }
		}
		
        partial void OnPageSettingsChanging(byte[] value);
        partial void OnPageSettingsChanged();
		
		private byte[] _PageSettings;
		[DataMember]
		public byte[] PageSettings { 
		    get{
		        return _PageSettings;
		    } 
		    set{
		        this.OnPageSettingsChanging(value);
                this.SendPropertyChanging();
                this._PageSettings = value;
                this.SendPropertyChanged("PageSettings");
                this.OnPageSettingsChanged();
		    }
		}
		
        partial void OnLastUpdatedDateChanging(DateTime value);
        partial void OnLastUpdatedDateChanged();
		
		private DateTime _LastUpdatedDate;
		[DataMember]
		public DateTime LastUpdatedDate { 
		    get{
		        return _LastUpdatedDate;
		    } 
		    set{
		        this.OnLastUpdatedDateChanging(value);
                this.SendPropertyChanging();
                this._LastUpdatedDate = value;
                this.SendPropertyChanged("LastUpdatedDate");
                this.OnLastUpdatedDateChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<aspnet_Path> aspnet_Paths
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.aspnet_Paths
                       where items.PathId == _PathId
                       select items;
            }
        }

        public IQueryable<aspnet_User> aspnet_Users
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.aspnet_Users
                       where items.UserId == _UserId
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the HtmlContents table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.HtmlContent 
    /// </summary>
    [DataContract]
	public partial class HtmlContent:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public HtmlContent(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnIdChanging(int value);
        partial void OnIdChanged();
		
		private int _Id;
		[DataMember]
		public int Id { 
		    get{
		        return _Id;
		    } 
		    set{
		        this.OnIdChanging(value);
                this.SendPropertyChanging();
                this._Id = value;
                this.SendPropertyChanged("Id");
                this.OnIdChanged();
		    }
		}
		
        partial void OnDataChanging(string value);
        partial void OnDataChanged();
		
		private string _Data;
		[DataMember]
		public string Data { 
		    get{
		        return _Data;
		    } 
		    set{
		        this.OnDataChanging(value);
                this.SendPropertyChanging();
                this._Data = value;
                this.SendPropertyChanged("Data");
                this.OnDataChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<ContentVersion> ContentVersions
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.ContentVersions
                       where items.Id == _Id
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the aspnet_WebEvent_Events table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.aspnet_WebEvent_Event 
    /// </summary>
    [DataContract]
	public partial class aspnet_WebEvent_Event:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public aspnet_WebEvent_Event(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnEventIdChanging(string value);
        partial void OnEventIdChanged();
		
		private string _EventId;
		[DataMember]
		public string EventId { 
		    get{
		        return _EventId;
		    } 
		    set{
		        this.OnEventIdChanging(value);
                this.SendPropertyChanging();
                this._EventId = value;
                this.SendPropertyChanged("EventId");
                this.OnEventIdChanged();
		    }
		}
		
        partial void OnEventTimeUtcChanging(DateTime value);
        partial void OnEventTimeUtcChanged();
		
		private DateTime _EventTimeUtc;
		[DataMember]
		public DateTime EventTimeUtc { 
		    get{
		        return _EventTimeUtc;
		    } 
		    set{
		        this.OnEventTimeUtcChanging(value);
                this.SendPropertyChanging();
                this._EventTimeUtc = value;
                this.SendPropertyChanged("EventTimeUtc");
                this.OnEventTimeUtcChanged();
		    }
		}
		
        partial void OnEventTimeChanging(DateTime value);
        partial void OnEventTimeChanged();
		
		private DateTime _EventTime;
		[DataMember]
		public DateTime EventTime { 
		    get{
		        return _EventTime;
		    } 
		    set{
		        this.OnEventTimeChanging(value);
                this.SendPropertyChanging();
                this._EventTime = value;
                this.SendPropertyChanged("EventTime");
                this.OnEventTimeChanged();
		    }
		}
		
        partial void OnEventTypeChanging(string value);
        partial void OnEventTypeChanged();
		
		private string _EventType;
		[DataMember]
		public string EventType { 
		    get{
		        return _EventType;
		    } 
		    set{
		        this.OnEventTypeChanging(value);
                this.SendPropertyChanging();
                this._EventType = value;
                this.SendPropertyChanged("EventType");
                this.OnEventTypeChanged();
		    }
		}
		
        partial void OnEventSequenceChanging(decimal value);
        partial void OnEventSequenceChanged();
		
		private decimal _EventSequence;
		[DataMember]
		public decimal EventSequence { 
		    get{
		        return _EventSequence;
		    } 
		    set{
		        this.OnEventSequenceChanging(value);
                this.SendPropertyChanging();
                this._EventSequence = value;
                this.SendPropertyChanged("EventSequence");
                this.OnEventSequenceChanged();
		    }
		}
		
        partial void OnEventOccurrenceChanging(decimal value);
        partial void OnEventOccurrenceChanged();
		
		private decimal _EventOccurrence;
		[DataMember]
		public decimal EventOccurrence { 
		    get{
		        return _EventOccurrence;
		    } 
		    set{
		        this.OnEventOccurrenceChanging(value);
                this.SendPropertyChanging();
                this._EventOccurrence = value;
                this.SendPropertyChanged("EventOccurrence");
                this.OnEventOccurrenceChanged();
		    }
		}
		
        partial void OnEventCodeChanging(int value);
        partial void OnEventCodeChanged();
		
		private int _EventCode;
		[DataMember]
		public int EventCode { 
		    get{
		        return _EventCode;
		    } 
		    set{
		        this.OnEventCodeChanging(value);
                this.SendPropertyChanging();
                this._EventCode = value;
                this.SendPropertyChanged("EventCode");
                this.OnEventCodeChanged();
		    }
		}
		
        partial void OnEventDetailCodeChanging(int value);
        partial void OnEventDetailCodeChanged();
		
		private int _EventDetailCode;
		[DataMember]
		public int EventDetailCode { 
		    get{
		        return _EventDetailCode;
		    } 
		    set{
		        this.OnEventDetailCodeChanging(value);
                this.SendPropertyChanging();
                this._EventDetailCode = value;
                this.SendPropertyChanged("EventDetailCode");
                this.OnEventDetailCodeChanged();
		    }
		}
		
        partial void OnMessageChanging(string value);
        partial void OnMessageChanged();
		
		private string _Message;
		[DataMember]
		public string Message { 
		    get{
		        return _Message;
		    } 
		    set{
		        this.OnMessageChanging(value);
                this.SendPropertyChanging();
                this._Message = value;
                this.SendPropertyChanged("Message");
                this.OnMessageChanged();
		    }
		}
		
        partial void OnApplicationPathChanging(string value);
        partial void OnApplicationPathChanged();
		
		private string _ApplicationPath;
		[DataMember]
		public string ApplicationPath { 
		    get{
		        return _ApplicationPath;
		    } 
		    set{
		        this.OnApplicationPathChanging(value);
                this.SendPropertyChanging();
                this._ApplicationPath = value;
                this.SendPropertyChanged("ApplicationPath");
                this.OnApplicationPathChanged();
		    }
		}
		
        partial void OnApplicationVirtualPathChanging(string value);
        partial void OnApplicationVirtualPathChanged();
		
		private string _ApplicationVirtualPath;
		[DataMember]
		public string ApplicationVirtualPath { 
		    get{
		        return _ApplicationVirtualPath;
		    } 
		    set{
		        this.OnApplicationVirtualPathChanging(value);
                this.SendPropertyChanging();
                this._ApplicationVirtualPath = value;
                this.SendPropertyChanged("ApplicationVirtualPath");
                this.OnApplicationVirtualPathChanged();
		    }
		}
		
        partial void OnMachineNameChanging(string value);
        partial void OnMachineNameChanged();
		
		private string _MachineName;
		[DataMember]
		public string MachineName { 
		    get{
		        return _MachineName;
		    } 
		    set{
		        this.OnMachineNameChanging(value);
                this.SendPropertyChanging();
                this._MachineName = value;
                this.SendPropertyChanged("MachineName");
                this.OnMachineNameChanged();
		    }
		}
		
        partial void OnRequestUrlChanging(string value);
        partial void OnRequestUrlChanged();
		
		private string _RequestUrl;
		[DataMember]
		public string RequestUrl { 
		    get{
		        return _RequestUrl;
		    } 
		    set{
		        this.OnRequestUrlChanging(value);
                this.SendPropertyChanging();
                this._RequestUrl = value;
                this.SendPropertyChanged("RequestUrl");
                this.OnRequestUrlChanged();
		    }
		}
		
        partial void OnExceptionTypeChanging(string value);
        partial void OnExceptionTypeChanged();
		
		private string _ExceptionType;
		[DataMember]
		public string ExceptionType { 
		    get{
		        return _ExceptionType;
		    } 
		    set{
		        this.OnExceptionTypeChanging(value);
                this.SendPropertyChanging();
                this._ExceptionType = value;
                this.SendPropertyChanged("ExceptionType");
                this.OnExceptionTypeChanged();
		    }
		}
		
        partial void OnDetailsChanging(string value);
        partial void OnDetailsChanged();
		
		private string _Details;
		[DataMember]
		public string Details { 
		    get{
		        return _Details;
		    } 
		    set{
		        this.OnDetailsChanging(value);
                this.SendPropertyChanging();
                this._Details = value;
                this.SendPropertyChanged("Details");
                this.OnDetailsChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the UIResources table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.UIResource 
    /// </summary>
    [DataContract]
	public partial class UIResource:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public UIResource(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnIdChanging(int value);
        partial void OnIdChanged();
		
		private int _Id;
		[DataMember]
		public int Id { 
		    get{
		        return _Id;
		    } 
		    set{
		        this.OnIdChanging(value);
                this.SendPropertyChanging();
                this._Id = value;
                this.SendPropertyChanged("Id");
                this.OnIdChanged();
		    }
		}
		
        partial void OnCodeNameChanging(string value);
        partial void OnCodeNameChanged();
		
		private string _CodeName;
		[DataMember]
		public string CodeName { 
		    get{
		        return _CodeName;
		    } 
		    set{
		        this.OnCodeNameChanging(value);
                this.SendPropertyChanging();
                this._CodeName = value;
                this.SendPropertyChanged("CodeName");
                this.OnCodeNameChanged();
		    }
		}
		
        partial void OnValueChanging(string value);
        partial void OnValueChanged();
		
		private string _Value;
		[DataMember]
		public string Value { 
		    get{
		        return _Value;
		    } 
		    set{
		        this.OnValueChanging(value);
                this.SendPropertyChanging();
                this._Value = value;
                this.SendPropertyChanged("Value");
                this.OnValueChanged();
		    }
		}
		
        partial void OnModuleIdChanging(int? value);
        partial void OnModuleIdChanged();
		
		private int? _ModuleId;
		[DataMember]
		public int? ModuleId { 
		    get{
		        return _ModuleId;
		    } 
		    set{
		        this.OnModuleIdChanging(value);
                this.SendPropertyChanging();
                this._ModuleId = value;
                this.SendPropertyChanged("ModuleId");
                this.OnModuleIdChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<Plugins_In_Page> Plugins_In_Pages
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.Plugins_In_Pages
                       where items.Id == _ModuleId
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the MenuData table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.MenuDatum 
    /// </summary>
    [DataContract]
	public partial class MenuDatum:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public MenuDatum(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnIdChanging(int value);
        partial void OnIdChanged();
		
		private int _Id;
		[DataMember]
		public int Id { 
		    get{
		        return _Id;
		    } 
		    set{
		        this.OnIdChanging(value);
                this.SendPropertyChanging();
                this._Id = value;
                this.SendPropertyChanged("Id");
                this.OnIdChanged();
		    }
		}
		
        partial void OnTitleChanging(string value);
        partial void OnTitleChanged();
		
		private string _Title;
		[DataMember]
		public string Title { 
		    get{
		        return _Title;
		    } 
		    set{
		        this.OnTitleChanging(value);
                this.SendPropertyChanging();
                this._Title = value;
                this.SendPropertyChanged("Title");
                this.OnTitleChanged();
		    }
		}
		
        partial void OnURIChanging(string value);
        partial void OnURIChanged();
		
		private string _URI;
		[DataMember]
		public string URI { 
		    get{
		        return _URI;
		    } 
		    set{
		        this.OnURIChanging(value);
                this.SendPropertyChanging();
                this._URI = value;
                this.SendPropertyChanged("URI");
                this.OnURIChanged();
		    }
		}
		
        partial void OnURLChanging(string value);
        partial void OnURLChanged();
		
		private string _URL;
		[DataMember]
		public string URL { 
		    get{
		        return _URL;
		    } 
		    set{
		        this.OnURLChanging(value);
                this.SendPropertyChanging();
                this._URL = value;
                this.SendPropertyChanged("URL");
                this.OnURLChanged();
		    }
		}
		
        partial void OnMenuIdChanging(int? value);
        partial void OnMenuIdChanged();
		
		private int? _MenuId;
		[DataMember]
		public int? MenuId { 
		    get{
		        return _MenuId;
		    } 
		    set{
		        this.OnMenuIdChanging(value);
                this.SendPropertyChanging();
                this._MenuId = value;
                this.SendPropertyChanged("MenuId");
                this.OnMenuIdChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<ContentVersion> ContentVersions
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.ContentVersions
                       where items.Id == _Id
                       select items;
            }
        }

        public IQueryable<Menu> Menus
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.Menus
                       where items.Id == _MenuId
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the Clients table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.Client 
    /// </summary>
    [DataContract]
	public partial class Client:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public Client(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnFirstNameChanging(string value);
        partial void OnFirstNameChanged();
		
		private string _FirstName;
		[DataMember]
		public string FirstName { 
		    get{
		        return _FirstName;
		    } 
		    set{
		        this.OnFirstNameChanging(value);
                this.SendPropertyChanging();
                this._FirstName = value;
                this.SendPropertyChanged("FirstName");
                this.OnFirstNameChanged();
		    }
		}
		
        partial void OnFamilyNameChanging(string value);
        partial void OnFamilyNameChanged();
		
		private string _FamilyName;
		[DataMember]
		public string FamilyName { 
		    get{
		        return _FamilyName;
		    } 
		    set{
		        this.OnFamilyNameChanging(value);
                this.SendPropertyChanging();
                this._FamilyName = value;
                this.SendPropertyChanged("FamilyName");
                this.OnFamilyNameChanged();
		    }
		}
		
        partial void OnIDNumberChanging(long? value);
        partial void OnIDNumberChanged();
		
		private long? _IDNumber;
		[DataMember]
		public long? IDNumber { 
		    get{
		        return _IDNumber;
		    } 
		    set{
		        this.OnIDNumberChanging(value);
                this.SendPropertyChanging();
                this._IDNumber = value;
                this.SendPropertyChanged("IDNumber");
                this.OnIDNumberChanged();
		    }
		}
		
        partial void OnSexChanging(string value);
        partial void OnSexChanged();
		
		private string _Sex;
		[DataMember]
		public string Sex { 
		    get{
		        return _Sex;
		    } 
		    set{
		        this.OnSexChanging(value);
                this.SendPropertyChanging();
                this._Sex = value;
                this.SendPropertyChanged("Sex");
                this.OnSexChanged();
		    }
		}
		
        partial void OnBirthDateChanging(DateTime? value);
        partial void OnBirthDateChanged();
		
		private DateTime? _BirthDate;
		[DataMember]
		public DateTime? BirthDate { 
		    get{
		        return _BirthDate;
		    } 
		    set{
		        this.OnBirthDateChanging(value);
                this.SendPropertyChanging();
                this._BirthDate = value;
                this.SendPropertyChanged("BirthDate");
                this.OnBirthDateChanged();
		    }
		}
		
        partial void OnMarrageStateChanging(string value);
        partial void OnMarrageStateChanged();
		
		private string _MarrageState;
		[DataMember]
		public string MarrageState { 
		    get{
		        return _MarrageState;
		    } 
		    set{
		        this.OnMarrageStateChanging(value);
                this.SendPropertyChanging();
                this._MarrageState = value;
                this.SendPropertyChanged("MarrageState");
                this.OnMarrageStateChanged();
		    }
		}
		
        partial void OnNumberOfChildrenChanging(byte[] value);
        partial void OnNumberOfChildrenChanged();
		
		private byte[] _NumberOfChildren;
		[DataMember]
		public byte[] NumberOfChildren { 
		    get{
		        return _NumberOfChildren;
		    } 
		    set{
		        this.OnNumberOfChildrenChanging(value);
                this.SendPropertyChanging();
                this._NumberOfChildren = value;
                this.SendPropertyChanged("NumberOfChildren");
                this.OnNumberOfChildrenChanged();
		    }
		}
		
        partial void OnEducationChanging(string value);
        partial void OnEducationChanged();
		
		private string _Education;
		[DataMember]
		public string Education { 
		    get{
		        return _Education;
		    } 
		    set{
		        this.OnEducationChanging(value);
                this.SendPropertyChanging();
                this._Education = value;
                this.SendPropertyChanged("Education");
                this.OnEducationChanged();
		    }
		}
		
        partial void OnMothersFamilyNameChanging(string value);
        partial void OnMothersFamilyNameChanged();
		
		private string _MothersFamilyName;
		[DataMember]
		public string MothersFamilyName { 
		    get{
		        return _MothersFamilyName;
		    } 
		    set{
		        this.OnMothersFamilyNameChanging(value);
                this.SendPropertyChanging();
                this._MothersFamilyName = value;
                this.SendPropertyChanged("MothersFamilyName");
                this.OnMothersFamilyNameChanged();
		    }
		}
		
        partial void OnEntityVersionIdChanging(int value);
        partial void OnEntityVersionIdChanged();
		
		private int _EntityVersionId;
		[DataMember]
		public int EntityVersionId { 
		    get{
		        return _EntityVersionId;
		    } 
		    set{
		        this.OnEntityVersionIdChanging(value);
                this.SendPropertyChanging();
                this._EntityVersionId = value;
                this.SendPropertyChanged("EntityVersionId");
                this.OnEntityVersionIdChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<ContentVersion> ContentVersions
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.ContentVersions
                       where items.Id == _EntityVersionId
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the ContentVersions table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.ContentVersion 
    /// </summary>
    [DataContract]
	public partial class ContentVersion:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public ContentVersion(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnIdChanging(int value);
        partial void OnIdChanged();
		
		private int _Id;
		[DataMember]
		public int Id { 
		    get{
		        return _Id;
		    } 
		    set{
		        this.OnIdChanging(value);
                this.SendPropertyChanging();
                this._Id = value;
                this.SendPropertyChanged("Id");
                this.OnIdChanged();
		    }
		}
		
        partial void OnEntityIdChanging(int? value);
        partial void OnEntityIdChanged();
		
		private int? _EntityId;
		[DataMember]
		public int? EntityId { 
		    get{
		        return _EntityId;
		    } 
		    set{
		        this.OnEntityIdChanging(value);
                this.SendPropertyChanging();
                this._EntityId = value;
                this.SendPropertyChanged("EntityId");
                this.OnEntityIdChanged();
		    }
		}
		
        partial void OnIsCurrentChanging(bool value);
        partial void OnIsCurrentChanged();
		
		private bool _IsCurrent;
		[DataMember]
		public bool IsCurrent { 
		    get{
		        return _IsCurrent;
		    } 
		    set{
		        this.OnIsCurrentChanging(value);
                this.SendPropertyChanging();
                this._IsCurrent = value;
                this.SendPropertyChanged("IsCurrent");
                this.OnIsCurrentChanged();
		    }
		}
		
        partial void OnCreatedChanging(DateTime? value);
        partial void OnCreatedChanged();
		
		private DateTime? _Created;
		[DataMember]
		public DateTime? Created { 
		    get{
		        return _Created;
		    } 
		    set{
		        this.OnCreatedChanging(value);
                this.SendPropertyChanging();
                this._Created = value;
                this.SendPropertyChanged("Created");
                this.OnCreatedChanged();
		    }
		}
		
        partial void OnModifiedChanging(DateTime? value);
        partial void OnModifiedChanged();
		
		private DateTime? _Modified;
		[DataMember]
		public DateTime? Modified { 
		    get{
		        return _Modified;
		    } 
		    set{
		        this.OnModifiedChanging(value);
                this.SendPropertyChanging();
                this._Modified = value;
                this.SendPropertyChanged("Modified");
                this.OnModifiedChanged();
		    }
		}
		
        partial void OnIsPublishedChanging(bool value);
        partial void OnIsPublishedChanged();
		
		private bool _IsPublished;
		[DataMember]
		public bool IsPublished { 
		    get{
		        return _IsPublished;
		    } 
		    set{
		        this.OnIsPublishedChanging(value);
                this.SendPropertyChanging();
                this._IsPublished = value;
                this.SendPropertyChanged("IsPublished");
                this.OnIsPublishedChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<Category> Categories
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.Categories
                       where items.Id == _Id
                       select items;
            }
        }

        public IQueryable<MenuDatum> MenuData
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.MenuData
                       where items.Id == _Id
                       select items;
            }
        }

        public IQueryable<ContentEntity> ContentEntities
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.ContentEntities
                       where items.Id == _EntityId
                       select items;
            }
        }

        public IQueryable<Client> Clients
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.Clients
                       where items.EntityVersionId == _Id
                       select items;
            }
        }

        public IQueryable<HtmlContent> HtmlContents
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.HtmlContents
                       where items.Id == _Id
                       select items;
            }
        }

        public IQueryable<Medium> Media
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.Media
                       where items.Id == _Id
                       select items;
            }
        }

        public IQueryable<Plugins_In_Page> Plugins_In_Pages
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.Plugins_In_Pages
                       where items.EntityVersionId == _Id
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the aspnet_UserProfile table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.aspnet_UserProfile 
    /// </summary>
    [DataContract]
	public partial class aspnet_UserProfile:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public aspnet_UserProfile(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnUserIdChanging(Guid value);
        partial void OnUserIdChanged();
		
		private Guid _UserId;
		[DataMember]
		public Guid UserId { 
		    get{
		        return _UserId;
		    } 
		    set{
		        this.OnUserIdChanging(value);
                this.SendPropertyChanging();
                this._UserId = value;
                this.SendPropertyChanged("UserId");
                this.OnUserIdChanged();
		    }
		}
		
        partial void OnFirstNameChanging(string value);
        partial void OnFirstNameChanged();
		
		private string _FirstName;
		[DataMember]
		public string FirstName { 
		    get{
		        return _FirstName;
		    } 
		    set{
		        this.OnFirstNameChanging(value);
                this.SendPropertyChanging();
                this._FirstName = value;
                this.SendPropertyChanged("FirstName");
                this.OnFirstNameChanged();
		    }
		}
		
        partial void OnFamilyNameChanging(string value);
        partial void OnFamilyNameChanged();
		
		private string _FamilyName;
		[DataMember]
		public string FamilyName { 
		    get{
		        return _FamilyName;
		    } 
		    set{
		        this.OnFamilyNameChanging(value);
                this.SendPropertyChanging();
                this._FamilyName = value;
                this.SendPropertyChanged("FamilyName");
                this.OnFamilyNameChanged();
		    }
		}
		
        partial void OnEntityIdChanging(int? value);
        partial void OnEntityIdChanged();
		
		private int? _EntityId;
		[DataMember]
		public int? EntityId { 
		    get{
		        return _EntityId;
		    } 
		    set{
		        this.OnEntityIdChanging(value);
                this.SendPropertyChanging();
                this._EntityId = value;
                this.SendPropertyChanged("EntityId");
                this.OnEntityIdChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<aspnet_User> aspnet_Users
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.aspnet_Users
                       where items.UserId == _UserId
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the Media table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.Medium 
    /// </summary>
    [DataContract]
	public partial class Medium:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public Medium(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnIdChanging(int value);
        partial void OnIdChanged();
		
		private int _Id;
		[DataMember]
		public int Id { 
		    get{
		        return _Id;
		    } 
		    set{
		        this.OnIdChanging(value);
                this.SendPropertyChanging();
                this._Id = value;
                this.SendPropertyChanged("Id");
                this.OnIdChanged();
		    }
		}
		
        partial void OnTitleChanging(string value);
        partial void OnTitleChanged();
		
		private string _Title;
		[DataMember]
		public string Title { 
		    get{
		        return _Title;
		    } 
		    set{
		        this.OnTitleChanging(value);
                this.SendPropertyChanging();
                this._Title = value;
                this.SendPropertyChanged("Title");
                this.OnTitleChanged();
		    }
		}
		
        partial void OnURIChanging(string value);
        partial void OnURIChanged();
		
		private string _URI;
		[DataMember]
		public string URI { 
		    get{
		        return _URI;
		    } 
		    set{
		        this.OnURIChanging(value);
                this.SendPropertyChanging();
                this._URI = value;
                this.SendPropertyChanged("URI");
                this.OnURIChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<ContentVersion> ContentVersions
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.ContentVersions
                       where items.Id == _Id
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the Meny_To_Menies table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.Meny_To_Meny 
    /// </summary>
    [DataContract]
	public partial class Meny_To_Meny:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public Meny_To_Meny(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnIdChanging(int value);
        partial void OnIdChanged();
		
		private int _Id;
		[DataMember]
		public int Id { 
		    get{
		        return _Id;
		    } 
		    set{
		        this.OnIdChanging(value);
                this.SendPropertyChanging();
                this._Id = value;
                this.SendPropertyChanged("Id");
                this.OnIdChanged();
		    }
		}
		
        partial void OnRelatedEntityIdChanging(int value);
        partial void OnRelatedEntityIdChanged();
		
		private int _RelatedEntityId;
		[DataMember]
		public int RelatedEntityId { 
		    get{
		        return _RelatedEntityId;
		    } 
		    set{
		        this.OnRelatedEntityIdChanging(value);
                this.SendPropertyChanging();
                this._RelatedEntityId = value;
                this.SendPropertyChanged("RelatedEntityId");
                this.OnRelatedEntityIdChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<ContentEntity> ContentEntities
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.ContentEntities
                       where items.Id == _Id
                       select items;
            }
        }

        public IQueryable<ContentEntity> ContentEntities1
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.ContentEntities
                       where items.Id == _RelatedEntityId
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the Menus table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.Menu 
    /// </summary>
    [DataContract]
	public partial class Menu:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public Menu(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnIdChanging(int value);
        partial void OnIdChanged();
		
		private int _Id;
		[DataMember]
		public int Id { 
		    get{
		        return _Id;
		    } 
		    set{
		        this.OnIdChanging(value);
                this.SendPropertyChanging();
                this._Id = value;
                this.SendPropertyChanged("Id");
                this.OnIdChanged();
		    }
		}
		
        partial void OnCodeNameChanging(string value);
        partial void OnCodeNameChanged();
		
		private string _CodeName;
		[DataMember]
		public string CodeName { 
		    get{
		        return _CodeName;
		    } 
		    set{
		        this.OnCodeNameChanging(value);
                this.SendPropertyChanging();
                this._CodeName = value;
                this.SendPropertyChanged("CodeName");
                this.OnCodeNameChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<MenuDatum> MenuData
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.MenuData
                       where items.MenuId == _Id
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the Domains table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.Domain 
    /// </summary>
    [DataContract]
	public partial class Domain:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public Domain(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnIdChanging(int value);
        partial void OnIdChanged();
		
		private int _Id;
		[DataMember]
		public int Id { 
		    get{
		        return _Id;
		    } 
		    set{
		        this.OnIdChanging(value);
                this.SendPropertyChanging();
                this._Id = value;
                this.SendPropertyChanged("Id");
                this.OnIdChanged();
		    }
		}
		
        partial void OnApplicationIdChanging(Guid value);
        partial void OnApplicationIdChanged();
		
		private Guid _ApplicationId;
		[DataMember]
		public Guid ApplicationId { 
		    get{
		        return _ApplicationId;
		    } 
		    set{
		        this.OnApplicationIdChanging(value);
                this.SendPropertyChanging();
                this._ApplicationId = value;
                this.SendPropertyChanged("ApplicationId");
                this.OnApplicationIdChanged();
		    }
		}
		
        partial void OnLanguageIdChanging(int value);
        partial void OnLanguageIdChanged();
		
		private int _LanguageId;
		[DataMember]
		public int LanguageId { 
		    get{
		        return _LanguageId;
		    } 
		    set{
		        this.OnLanguageIdChanging(value);
                this.SendPropertyChanging();
                this._LanguageId = value;
                this.SendPropertyChanged("LanguageId");
                this.OnLanguageIdChanged();
		    }
		}
		
        partial void OnMasterChanging(int value);
        partial void OnMasterChanged();
		
		private int _Master;
		[DataMember]
		public int Master { 
		    get{
		        return _Master;
		    } 
		    set{
		        this.OnMasterChanging(value);
                this.SendPropertyChanging();
                this._Master = value;
                this.SendPropertyChanged("Master");
                this.OnMasterChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<ContentEntity> ContentEntities
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.ContentEntities
                       where items.DomainsId == _Id
                       select items;
            }
        }

        public IQueryable<aspnet_Application> aspnet_Applications
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.aspnet_Applications
                       where items.Id == _ApplicationId
                       select items;
            }
        }

        public IQueryable<Language> Languages
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.Languages
                       where items.Id == _LanguageId
                       select items;
            }
        }

        public IQueryable<WebPage> WebPages
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.WebPages
                       where items.DomainsId == _Id
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the aspnet_Users table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.aspnet_User 
    /// </summary>
    [DataContract]
	public partial class aspnet_User:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public aspnet_User(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnApplicationIdChanging(Guid value);
        partial void OnApplicationIdChanged();
		
		private Guid _ApplicationId;
		[DataMember]
		public Guid ApplicationId { 
		    get{
		        return _ApplicationId;
		    } 
		    set{
		        this.OnApplicationIdChanging(value);
                this.SendPropertyChanging();
                this._ApplicationId = value;
                this.SendPropertyChanged("ApplicationId");
                this.OnApplicationIdChanged();
		    }
		}
		
        partial void OnUserIdChanging(Guid value);
        partial void OnUserIdChanged();
		
		private Guid _UserId;
		[DataMember]
		public Guid UserId { 
		    get{
		        return _UserId;
		    } 
		    set{
		        this.OnUserIdChanging(value);
                this.SendPropertyChanging();
                this._UserId = value;
                this.SendPropertyChanged("UserId");
                this.OnUserIdChanged();
		    }
		}
		
        partial void OnUserNameChanging(string value);
        partial void OnUserNameChanged();
		
		private string _UserName;
		[DataMember]
		public string UserName { 
		    get{
		        return _UserName;
		    } 
		    set{
		        this.OnUserNameChanging(value);
                this.SendPropertyChanging();
                this._UserName = value;
                this.SendPropertyChanged("UserName");
                this.OnUserNameChanged();
		    }
		}
		
        partial void OnLoweredUserNameChanging(string value);
        partial void OnLoweredUserNameChanged();
		
		private string _LoweredUserName;
		[DataMember]
		public string LoweredUserName { 
		    get{
		        return _LoweredUserName;
		    } 
		    set{
		        this.OnLoweredUserNameChanging(value);
                this.SendPropertyChanging();
                this._LoweredUserName = value;
                this.SendPropertyChanged("LoweredUserName");
                this.OnLoweredUserNameChanged();
		    }
		}
		
        partial void OnMobileAliasChanging(string value);
        partial void OnMobileAliasChanged();
		
		private string _MobileAlias;
		[DataMember]
		public string MobileAlias { 
		    get{
		        return _MobileAlias;
		    } 
		    set{
		        this.OnMobileAliasChanging(value);
                this.SendPropertyChanging();
                this._MobileAlias = value;
                this.SendPropertyChanged("MobileAlias");
                this.OnMobileAliasChanged();
		    }
		}
		
        partial void OnIsAnonymousChanging(bool value);
        partial void OnIsAnonymousChanged();
		
		private bool _IsAnonymous;
		[DataMember]
		public bool IsAnonymous { 
		    get{
		        return _IsAnonymous;
		    } 
		    set{
		        this.OnIsAnonymousChanging(value);
                this.SendPropertyChanging();
                this._IsAnonymous = value;
                this.SendPropertyChanged("IsAnonymous");
                this.OnIsAnonymousChanged();
		    }
		}
		
        partial void OnLastActivityDateChanging(DateTime value);
        partial void OnLastActivityDateChanged();
		
		private DateTime _LastActivityDate;
		[DataMember]
		public DateTime LastActivityDate { 
		    get{
		        return _LastActivityDate;
		    } 
		    set{
		        this.OnLastActivityDateChanging(value);
                this.SendPropertyChanging();
                this._LastActivityDate = value;
                this.SendPropertyChanged("LastActivityDate");
                this.OnLastActivityDateChanged();
		    }
		}
		
        partial void OnExparationDateChanging(DateTime? value);
        partial void OnExparationDateChanged();
		
		private DateTime? _ExparationDate;
		[DataMember]
		public DateTime? ExparationDate { 
		    get{
		        return _ExparationDate;
		    } 
		    set{
		        this.OnExparationDateChanging(value);
                this.SendPropertyChanging();
                this._ExparationDate = value;
                this.SendPropertyChanged("ExparationDate");
                this.OnExparationDateChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<aspnet_Membership> aspnet_Memberships
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.aspnet_Memberships
                       where items.UserId == _UserId
                       select items;
            }
        }

        public IQueryable<aspnet_PersonalizationPerUser> aspnet_PersonalizationPerUsers
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.aspnet_PersonalizationPerUsers
                       where items.UserId == _UserId
                       select items;
            }
        }

        public IQueryable<aspnet_Profile> aspnet_Profiles
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.aspnet_Profiles
                       where items.UserId == _UserId
                       select items;
            }
        }

        public IQueryable<aspnet_Application> aspnet_Applications
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.aspnet_Applications
                       where items.Id == _ApplicationId
                       select items;
            }
        }

        public IQueryable<aspnet_UsersInRole> aspnet_UsersInRoles
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.aspnet_UsersInRoles
                       where items.UserId == _UserId
                       select items;
            }
        }

        public IQueryable<aspnet_UserProfile> aspnet_UserProfiles
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.aspnet_UserProfiles
                       where items.UserId == _UserId
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the aspnet_Applications table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.aspnet_Application 
    /// </summary>
    [DataContract]
	public partial class aspnet_Application:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public aspnet_Application(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnIdChanging(Guid value);
        partial void OnIdChanged();
		
		private Guid _Id;
		[DataMember]
		public Guid Id { 
		    get{
		        return _Id;
		    } 
		    set{
		        this.OnIdChanging(value);
                this.SendPropertyChanging();
                this._Id = value;
                this.SendPropertyChanged("Id");
                this.OnIdChanged();
		    }
		}
		
        partial void OnApplicationNameChanging(string value);
        partial void OnApplicationNameChanged();
		
		private string _ApplicationName;
		[DataMember]
		public string ApplicationName { 
		    get{
		        return _ApplicationName;
		    } 
		    set{
		        this.OnApplicationNameChanging(value);
                this.SendPropertyChanging();
                this._ApplicationName = value;
                this.SendPropertyChanged("ApplicationName");
                this.OnApplicationNameChanged();
		    }
		}
		
        partial void OnLoweredApplicationNameChanging(string value);
        partial void OnLoweredApplicationNameChanged();
		
		private string _LoweredApplicationName;
		[DataMember]
		public string LoweredApplicationName { 
		    get{
		        return _LoweredApplicationName;
		    } 
		    set{
		        this.OnLoweredApplicationNameChanging(value);
                this.SendPropertyChanging();
                this._LoweredApplicationName = value;
                this.SendPropertyChanged("LoweredApplicationName");
                this.OnLoweredApplicationNameChanged();
		    }
		}
		
        partial void OnDescriptionChanging(string value);
        partial void OnDescriptionChanged();
		
		private string _Description;
		[DataMember]
		public string Description { 
		    get{
		        return _Description;
		    } 
		    set{
		        this.OnDescriptionChanging(value);
                this.SendPropertyChanging();
                this._Description = value;
                this.SendPropertyChanged("Description");
                this.OnDescriptionChanged();
		    }
		}
		
        partial void OnDevNameChanging(string value);
        partial void OnDevNameChanged();
		
		private string _DevName;
		[DataMember]
		public string DevName { 
		    get{
		        return _DevName;
		    } 
		    set{
		        this.OnDevNameChanging(value);
                this.SendPropertyChanging();
                this._DevName = value;
                this.SendPropertyChanged("DevName");
                this.OnDevNameChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<aspnet_Membership> aspnet_Memberships
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.aspnet_Memberships
                       where items.ApplicationId == _Id
                       select items;
            }
        }

        public IQueryable<aspnet_Path> aspnet_Paths
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.aspnet_Paths
                       where items.ApplicationId == _Id
                       select items;
            }
        }

        public IQueryable<aspnet_Role> aspnet_Roles
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.aspnet_Roles
                       where items.ApplicationId == _Id
                       select items;
            }
        }

        public IQueryable<aspnet_User> aspnet_Users
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.aspnet_Users
                       where items.ApplicationId == _Id
                       select items;
            }
        }

        public IQueryable<Domain> Domains
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.Domains
                       where items.ApplicationId == _Id
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the ContentEntities table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.ContentEntity 
    /// </summary>
    [DataContract]
	public partial class ContentEntity:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public ContentEntity(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnIdChanging(int value);
        partial void OnIdChanged();
		
		private int _Id;
		[DataMember]
		public int Id { 
		    get{
		        return _Id;
		    } 
		    set{
		        this.OnIdChanging(value);
                this.SendPropertyChanging();
                this._Id = value;
                this.SendPropertyChanged("Id");
                this.OnIdChanged();
		    }
		}
		
        partial void OnTypeChanging(string value);
        partial void OnTypeChanged();
		
		private string _Type;
		[DataMember]
		public string Type { 
		    get{
		        return _Type;
		    } 
		    set{
		        this.OnTypeChanging(value);
                this.SendPropertyChanging();
                this._Type = value;
                this.SendPropertyChanged("Type");
                this.OnTypeChanged();
		    }
		}
		
        partial void OnIsBlockedChanging(bool value);
        partial void OnIsBlockedChanged();
		
		private bool _IsBlocked;
		[DataMember]
		public bool IsBlocked { 
		    get{
		        return _IsBlocked;
		    } 
		    set{
		        this.OnIsBlockedChanging(value);
                this.SendPropertyChanging();
                this._IsBlocked = value;
                this.SendPropertyChanged("IsBlocked");
                this.OnIsBlockedChanged();
		    }
		}
		
        partial void OnParentIdChanging(int? value);
        partial void OnParentIdChanged();
		
		private int? _ParentId;
		[DataMember]
		public int? ParentId { 
		    get{
		        return _ParentId;
		    } 
		    set{
		        this.OnParentIdChanging(value);
                this.SendPropertyChanging();
                this._ParentId = value;
                this.SendPropertyChanged("ParentId");
                this.OnParentIdChanged();
		    }
		}
		
        partial void OnMasterSyncIdChanging(int? value);
        partial void OnMasterSyncIdChanged();
		
		private int? _MasterSyncId;
		[DataMember]
		public int? MasterSyncId { 
		    get{
		        return _MasterSyncId;
		    } 
		    set{
		        this.OnMasterSyncIdChanging(value);
                this.SendPropertyChanging();
                this._MasterSyncId = value;
                this.SendPropertyChanged("MasterSyncId");
                this.OnMasterSyncIdChanged();
		    }
		}
		
        partial void OnDomainsIdChanging(int value);
        partial void OnDomainsIdChanged();
		
		private int _DomainsId;
		[DataMember]
		public int DomainsId { 
		    get{
		        return _DomainsId;
		    } 
		    set{
		        this.OnDomainsIdChanging(value);
                this.SendPropertyChanging();
                this._DomainsId = value;
                this.SendPropertyChanged("DomainsId");
                this.OnDomainsIdChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<ContentEntity> ContentEntities
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.ContentEntities
                       where items.Id == _ParentId
                       select items;
            }
        }

        public IQueryable<Domain> Domains
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.Domains
                       where items.Id == _DomainsId
                       select items;
            }
        }

        public IQueryable<ContentVersion> ContentVersions
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.ContentVersions
                       where items.EntityId == _Id
                       select items;
            }
        }

        public IQueryable<Meny_To_Meny> Meny_To_Menies
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.Meny_To_Menies
                       where items.Id == _Id
                       select items;
            }
        }

        public IQueryable<Meny_To_Meny> Meny_To_Menies4
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.Meny_To_Menies
                       where items.RelatedEntityId == _Id
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the aspnet_SchemaVersions table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.aspnet_SchemaVersion 
    /// </summary>
    [DataContract]
	public partial class aspnet_SchemaVersion:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public aspnet_SchemaVersion(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnFeatureChanging(string value);
        partial void OnFeatureChanged();
		
		private string _Feature;
		[DataMember]
		public string Feature { 
		    get{
		        return _Feature;
		    } 
		    set{
		        this.OnFeatureChanging(value);
                this.SendPropertyChanging();
                this._Feature = value;
                this.SendPropertyChanged("Feature");
                this.OnFeatureChanged();
		    }
		}
		
        partial void OnCompatibleSchemaVersionChanging(string value);
        partial void OnCompatibleSchemaVersionChanged();
		
		private string _CompatibleSchemaVersion;
		[DataMember]
		public string CompatibleSchemaVersion { 
		    get{
		        return _CompatibleSchemaVersion;
		    } 
		    set{
		        this.OnCompatibleSchemaVersionChanging(value);
                this.SendPropertyChanging();
                this._CompatibleSchemaVersion = value;
                this.SendPropertyChanged("CompatibleSchemaVersion");
                this.OnCompatibleSchemaVersionChanged();
		    }
		}
		
        partial void OnIsCurrentVersionChanging(bool value);
        partial void OnIsCurrentVersionChanged();
		
		private bool _IsCurrentVersion;
		[DataMember]
		public bool IsCurrentVersion { 
		    get{
		        return _IsCurrentVersion;
		    } 
		    set{
		        this.OnIsCurrentVersionChanging(value);
                this.SendPropertyChanging();
                this._IsCurrentVersion = value;
                this.SendPropertyChanged("IsCurrentVersion");
                this.OnIsCurrentVersionChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the WebPages table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.WebPage 
    /// </summary>
    [DataContract]
	public partial class WebPage:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public WebPage(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnIdChanging(int value);
        partial void OnIdChanged();
		
		private int _Id;
		[DataMember]
		public int Id { 
		    get{
		        return _Id;
		    } 
		    set{
		        this.OnIdChanging(value);
                this.SendPropertyChanging();
                this._Id = value;
                this.SendPropertyChanged("Id");
                this.OnIdChanged();
		    }
		}
		
        partial void OnParentIdChanging(int? value);
        partial void OnParentIdChanged();
		
		private int? _ParentId;
		[DataMember]
		public int? ParentId { 
		    get{
		        return _ParentId;
		    } 
		    set{
		        this.OnParentIdChanging(value);
                this.SendPropertyChanging();
                this._ParentId = value;
                this.SendPropertyChanged("ParentId");
                this.OnParentIdChanged();
		    }
		}
		
        partial void OnNameChanging(string value);
        partial void OnNameChanged();
		
		private string _Name;
		[DataMember]
		public string Name { 
		    get{
		        return _Name;
		    } 
		    set{
		        this.OnNameChanging(value);
                this.SendPropertyChanging();
                this._Name = value;
                this.SendPropertyChanged("Name");
                this.OnNameChanged();
		    }
		}
		
        partial void OnURIChanging(string value);
        partial void OnURIChanged();
		
		private string _URI;
		[DataMember]
		public string URI { 
		    get{
		        return _URI;
		    } 
		    set{
		        this.OnURIChanging(value);
                this.SendPropertyChanging();
                this._URI = value;
                this.SendPropertyChanged("URI");
                this.OnURIChanged();
		    }
		}
		
        partial void OnRedirectURIChanging(string value);
        partial void OnRedirectURIChanged();
		
		private string _RedirectURI;
		[DataMember]
		public string RedirectURI { 
		    get{
		        return _RedirectURI;
		    } 
		    set{
		        this.OnRedirectURIChanging(value);
                this.SendPropertyChanging();
                this._RedirectURI = value;
                this.SendPropertyChanged("RedirectURI");
                this.OnRedirectURIChanged();
		    }
		}
		
        partial void OnMasterSyncIdChanging(int? value);
        partial void OnMasterSyncIdChanged();
		
		private int? _MasterSyncId;
		[DataMember]
		public int? MasterSyncId { 
		    get{
		        return _MasterSyncId;
		    } 
		    set{
		        this.OnMasterSyncIdChanging(value);
                this.SendPropertyChanging();
                this._MasterSyncId = value;
                this.SendPropertyChanged("MasterSyncId");
                this.OnMasterSyncIdChanged();
		    }
		}
		
        partial void OnDomainsIdChanging(int value);
        partial void OnDomainsIdChanged();
		
		private int _DomainsId;
		[DataMember]
		public int DomainsId { 
		    get{
		        return _DomainsId;
		    } 
		    set{
		        this.OnDomainsIdChanging(value);
                this.SendPropertyChanging();
                this._DomainsId = value;
                this.SendPropertyChanged("DomainsId");
                this.OnDomainsIdChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<Plugins_In_Page> Plugins_In_Pages
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.Plugins_In_Pages
                       where items.RootPageId == _Id
                       select items;
            }
        }

        public IQueryable<WebPage> WebPages
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.WebPages
                       where items.Id == _ParentId
                       select items;
            }
        }

        public IQueryable<Domain> Domains
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.Domains
                       where items.Id == _DomainsId
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the CoreEntities table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.CoreEntity 
    /// </summary>
    [DataContract]
	public partial class CoreEntity:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public CoreEntity(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnIdChanging(int value);
        partial void OnIdChanged();
		
		private int _Id;
		[DataMember]
		public int Id { 
		    get{
		        return _Id;
		    } 
		    set{
		        this.OnIdChanging(value);
                this.SendPropertyChanging();
                this._Id = value;
                this.SendPropertyChanged("Id");
                this.OnIdChanged();
		    }
		}
		
        partial void OnTypeChanging(string value);
        partial void OnTypeChanged();
		
		private string _Type;
		[DataMember]
		public string Type { 
		    get{
		        return _Type;
		    } 
		    set{
		        this.OnTypeChanging(value);
                this.SendPropertyChanging();
                this._Type = value;
                this.SendPropertyChanged("Type");
                this.OnTypeChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<City> Cities
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.Cities
                       where items.Id == _Id
                       select items;
            }
        }

        public IQueryable<Language> Languages
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.Languages
                       where items.Id == _Id
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the Categories table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.Category 
    /// </summary>
    [DataContract]
	public partial class Category:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public Category(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnIdChanging(int value);
        partial void OnIdChanged();
		
		private int _Id;
		[DataMember]
		public int Id { 
		    get{
		        return _Id;
		    } 
		    set{
		        this.OnIdChanging(value);
                this.SendPropertyChanging();
                this._Id = value;
                this.SendPropertyChanged("Id");
                this.OnIdChanged();
		    }
		}
		
        partial void OnTitleChanging(string value);
        partial void OnTitleChanged();
		
		private string _Title;
		[DataMember]
		public string Title { 
		    get{
		        return _Title;
		    } 
		    set{
		        this.OnTitleChanging(value);
                this.SendPropertyChanging();
                this._Title = value;
                this.SendPropertyChanged("Title");
                this.OnTitleChanged();
		    }
		}
		
        partial void OnDescriptionChanging(string value);
        partial void OnDescriptionChanged();
		
		private string _Description;
		[DataMember]
		public string Description { 
		    get{
		        return _Description;
		    } 
		    set{
		        this.OnDescriptionChanging(value);
                this.SendPropertyChanging();
                this._Description = value;
                this.SendPropertyChanged("Description");
                this.OnDescriptionChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<ContentVersion> ContentVersions
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.ContentVersions
                       where items.Id == _Id
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the aspnet_Membership table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.aspnet_Membership 
    /// </summary>
    [DataContract]
	public partial class aspnet_Membership:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public aspnet_Membership(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnApplicationIdChanging(Guid value);
        partial void OnApplicationIdChanged();
		
		private Guid _ApplicationId;
		[DataMember]
		public Guid ApplicationId { 
		    get{
		        return _ApplicationId;
		    } 
		    set{
		        this.OnApplicationIdChanging(value);
                this.SendPropertyChanging();
                this._ApplicationId = value;
                this.SendPropertyChanged("ApplicationId");
                this.OnApplicationIdChanged();
		    }
		}
		
        partial void OnUserIdChanging(Guid value);
        partial void OnUserIdChanged();
		
		private Guid _UserId;
		[DataMember]
		public Guid UserId { 
		    get{
		        return _UserId;
		    } 
		    set{
		        this.OnUserIdChanging(value);
                this.SendPropertyChanging();
                this._UserId = value;
                this.SendPropertyChanged("UserId");
                this.OnUserIdChanged();
		    }
		}
		
        partial void OnPasswordChanging(string value);
        partial void OnPasswordChanged();
		
		private string _Password;
		[DataMember]
		public string Password { 
		    get{
		        return _Password;
		    } 
		    set{
		        this.OnPasswordChanging(value);
                this.SendPropertyChanging();
                this._Password = value;
                this.SendPropertyChanged("Password");
                this.OnPasswordChanged();
		    }
		}
		
        partial void OnPasswordFormatChanging(int value);
        partial void OnPasswordFormatChanged();
		
		private int _PasswordFormat;
		[DataMember]
		public int PasswordFormat { 
		    get{
		        return _PasswordFormat;
		    } 
		    set{
		        this.OnPasswordFormatChanging(value);
                this.SendPropertyChanging();
                this._PasswordFormat = value;
                this.SendPropertyChanged("PasswordFormat");
                this.OnPasswordFormatChanged();
		    }
		}
		
        partial void OnPasswordSaltChanging(string value);
        partial void OnPasswordSaltChanged();
		
		private string _PasswordSalt;
		[DataMember]
		public string PasswordSalt { 
		    get{
		        return _PasswordSalt;
		    } 
		    set{
		        this.OnPasswordSaltChanging(value);
                this.SendPropertyChanging();
                this._PasswordSalt = value;
                this.SendPropertyChanged("PasswordSalt");
                this.OnPasswordSaltChanged();
		    }
		}
		
        partial void OnMobilePINChanging(string value);
        partial void OnMobilePINChanged();
		
		private string _MobilePIN;
		[DataMember]
		public string MobilePIN { 
		    get{
		        return _MobilePIN;
		    } 
		    set{
		        this.OnMobilePINChanging(value);
                this.SendPropertyChanging();
                this._MobilePIN = value;
                this.SendPropertyChanged("MobilePIN");
                this.OnMobilePINChanged();
		    }
		}
		
        partial void OnEmailChanging(string value);
        partial void OnEmailChanged();
		
		private string _Email;
		[DataMember]
		public string Email { 
		    get{
		        return _Email;
		    } 
		    set{
		        this.OnEmailChanging(value);
                this.SendPropertyChanging();
                this._Email = value;
                this.SendPropertyChanged("Email");
                this.OnEmailChanged();
		    }
		}
		
        partial void OnLoweredEmailChanging(string value);
        partial void OnLoweredEmailChanged();
		
		private string _LoweredEmail;
		[DataMember]
		public string LoweredEmail { 
		    get{
		        return _LoweredEmail;
		    } 
		    set{
		        this.OnLoweredEmailChanging(value);
                this.SendPropertyChanging();
                this._LoweredEmail = value;
                this.SendPropertyChanged("LoweredEmail");
                this.OnLoweredEmailChanged();
		    }
		}
		
        partial void OnPasswordQuestionChanging(string value);
        partial void OnPasswordQuestionChanged();
		
		private string _PasswordQuestion;
		[DataMember]
		public string PasswordQuestion { 
		    get{
		        return _PasswordQuestion;
		    } 
		    set{
		        this.OnPasswordQuestionChanging(value);
                this.SendPropertyChanging();
                this._PasswordQuestion = value;
                this.SendPropertyChanged("PasswordQuestion");
                this.OnPasswordQuestionChanged();
		    }
		}
		
        partial void OnPasswordAnswerChanging(string value);
        partial void OnPasswordAnswerChanged();
		
		private string _PasswordAnswer;
		[DataMember]
		public string PasswordAnswer { 
		    get{
		        return _PasswordAnswer;
		    } 
		    set{
		        this.OnPasswordAnswerChanging(value);
                this.SendPropertyChanging();
                this._PasswordAnswer = value;
                this.SendPropertyChanged("PasswordAnswer");
                this.OnPasswordAnswerChanged();
		    }
		}
		
        partial void OnIsApprovedChanging(bool value);
        partial void OnIsApprovedChanged();
		
		private bool _IsApproved;
		[DataMember]
		public bool IsApproved { 
		    get{
		        return _IsApproved;
		    } 
		    set{
		        this.OnIsApprovedChanging(value);
                this.SendPropertyChanging();
                this._IsApproved = value;
                this.SendPropertyChanged("IsApproved");
                this.OnIsApprovedChanged();
		    }
		}
		
        partial void OnIsLockedOutChanging(bool value);
        partial void OnIsLockedOutChanged();
		
		private bool _IsLockedOut;
		[DataMember]
		public bool IsLockedOut { 
		    get{
		        return _IsLockedOut;
		    } 
		    set{
		        this.OnIsLockedOutChanging(value);
                this.SendPropertyChanging();
                this._IsLockedOut = value;
                this.SendPropertyChanged("IsLockedOut");
                this.OnIsLockedOutChanged();
		    }
		}
		
        partial void OnCreateDateChanging(DateTime value);
        partial void OnCreateDateChanged();
		
		private DateTime _CreateDate;
		[DataMember]
		public DateTime CreateDate { 
		    get{
		        return _CreateDate;
		    } 
		    set{
		        this.OnCreateDateChanging(value);
                this.SendPropertyChanging();
                this._CreateDate = value;
                this.SendPropertyChanged("CreateDate");
                this.OnCreateDateChanged();
		    }
		}
		
        partial void OnLastLoginDateChanging(DateTime value);
        partial void OnLastLoginDateChanged();
		
		private DateTime _LastLoginDate;
		[DataMember]
		public DateTime LastLoginDate { 
		    get{
		        return _LastLoginDate;
		    } 
		    set{
		        this.OnLastLoginDateChanging(value);
                this.SendPropertyChanging();
                this._LastLoginDate = value;
                this.SendPropertyChanged("LastLoginDate");
                this.OnLastLoginDateChanged();
		    }
		}
		
        partial void OnLastPasswordChangedDateChanging(DateTime value);
        partial void OnLastPasswordChangedDateChanged();
		
		private DateTime _LastPasswordChangedDate;
		[DataMember]
		public DateTime LastPasswordChangedDate { 
		    get{
		        return _LastPasswordChangedDate;
		    } 
		    set{
		        this.OnLastPasswordChangedDateChanging(value);
                this.SendPropertyChanging();
                this._LastPasswordChangedDate = value;
                this.SendPropertyChanged("LastPasswordChangedDate");
                this.OnLastPasswordChangedDateChanged();
		    }
		}
		
        partial void OnLastLockoutDateChanging(DateTime value);
        partial void OnLastLockoutDateChanged();
		
		private DateTime _LastLockoutDate;
		[DataMember]
		public DateTime LastLockoutDate { 
		    get{
		        return _LastLockoutDate;
		    } 
		    set{
		        this.OnLastLockoutDateChanging(value);
                this.SendPropertyChanging();
                this._LastLockoutDate = value;
                this.SendPropertyChanged("LastLockoutDate");
                this.OnLastLockoutDateChanged();
		    }
		}
		
        partial void OnFailedPasswordAttemptCountChanging(int value);
        partial void OnFailedPasswordAttemptCountChanged();
		
		private int _FailedPasswordAttemptCount;
		[DataMember]
		public int FailedPasswordAttemptCount { 
		    get{
		        return _FailedPasswordAttemptCount;
		    } 
		    set{
		        this.OnFailedPasswordAttemptCountChanging(value);
                this.SendPropertyChanging();
                this._FailedPasswordAttemptCount = value;
                this.SendPropertyChanged("FailedPasswordAttemptCount");
                this.OnFailedPasswordAttemptCountChanged();
		    }
		}
		
        partial void OnFailedPasswordAttemptWindowStartChanging(DateTime value);
        partial void OnFailedPasswordAttemptWindowStartChanged();
		
		private DateTime _FailedPasswordAttemptWindowStart;
		[DataMember]
		public DateTime FailedPasswordAttemptWindowStart { 
		    get{
		        return _FailedPasswordAttemptWindowStart;
		    } 
		    set{
		        this.OnFailedPasswordAttemptWindowStartChanging(value);
                this.SendPropertyChanging();
                this._FailedPasswordAttemptWindowStart = value;
                this.SendPropertyChanged("FailedPasswordAttemptWindowStart");
                this.OnFailedPasswordAttemptWindowStartChanged();
		    }
		}
		
        partial void OnFailedPasswordAnswerAttemptCountChanging(int value);
        partial void OnFailedPasswordAnswerAttemptCountChanged();
		
		private int _FailedPasswordAnswerAttemptCount;
		[DataMember]
		public int FailedPasswordAnswerAttemptCount { 
		    get{
		        return _FailedPasswordAnswerAttemptCount;
		    } 
		    set{
		        this.OnFailedPasswordAnswerAttemptCountChanging(value);
                this.SendPropertyChanging();
                this._FailedPasswordAnswerAttemptCount = value;
                this.SendPropertyChanged("FailedPasswordAnswerAttemptCount");
                this.OnFailedPasswordAnswerAttemptCountChanged();
		    }
		}
		
        partial void OnFailedPasswordAnswerAttemptWindowStartChanging(DateTime value);
        partial void OnFailedPasswordAnswerAttemptWindowStartChanged();
		
		private DateTime _FailedPasswordAnswerAttemptWindowStart;
		[DataMember]
		public DateTime FailedPasswordAnswerAttemptWindowStart { 
		    get{
		        return _FailedPasswordAnswerAttemptWindowStart;
		    } 
		    set{
		        this.OnFailedPasswordAnswerAttemptWindowStartChanging(value);
                this.SendPropertyChanging();
                this._FailedPasswordAnswerAttemptWindowStart = value;
                this.SendPropertyChanged("FailedPasswordAnswerAttemptWindowStart");
                this.OnFailedPasswordAnswerAttemptWindowStartChanged();
		    }
		}
		
        partial void OnCommentChanging(string value);
        partial void OnCommentChanged();
		
		private string _Comment;
		[DataMember]
		public string Comment { 
		    get{
		        return _Comment;
		    } 
		    set{
		        this.OnCommentChanging(value);
                this.SendPropertyChanging();
                this._Comment = value;
                this.SendPropertyChanged("Comment");
                this.OnCommentChanged();
		    }
		}
		
        partial void OnExpireChanging(DateTime? value);
        partial void OnExpireChanged();
		
		private DateTime? _Expire;
		[DataMember]
		public DateTime? Expire { 
		    get{
		        return _Expire;
		    } 
		    set{
		        this.OnExpireChanging(value);
                this.SendPropertyChanging();
                this._Expire = value;
                this.SendPropertyChanged("Expire");
                this.OnExpireChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<aspnet_Application> aspnet_Applications
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.aspnet_Applications
                       where items.Id == _ApplicationId
                       select items;
            }
        }

        public IQueryable<aspnet_User> aspnet_Users
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.aspnet_Users
                       where items.UserId == _UserId
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the Cities table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.City 
    /// </summary>
    [DataContract]
	public partial class City:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public City(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnIdChanging(int value);
        partial void OnIdChanged();
		
		private int _Id;
		[DataMember]
		public int Id { 
		    get{
		        return _Id;
		    } 
		    set{
		        this.OnIdChanging(value);
                this.SendPropertyChanging();
                this._Id = value;
                this.SendPropertyChanged("Id");
                this.OnIdChanged();
		    }
		}
		
        partial void OnTitleChanging(string value);
        partial void OnTitleChanged();
		
		private string _Title;
		[DataMember]
		public string Title { 
		    get{
		        return _Title;
		    } 
		    set{
		        this.OnTitleChanging(value);
                this.SendPropertyChanging();
                this._Title = value;
                this.SendPropertyChanged("Title");
                this.OnTitleChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<CoreEntity> CoreEntities
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.CoreEntities
                       where items.Id == _Id
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the Languages table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.Language 
    /// </summary>
    [DataContract]
	public partial class Language:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public Language(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnIdChanging(int value);
        partial void OnIdChanged();
		
		private int _Id;
		[DataMember]
		public int Id { 
		    get{
		        return _Id;
		    } 
		    set{
		        this.OnIdChanging(value);
                this.SendPropertyChanging();
                this._Id = value;
                this.SendPropertyChanged("Id");
                this.OnIdChanged();
		    }
		}
		
        partial void OnCodeNameChanging(string value);
        partial void OnCodeNameChanged();
		
		private string _CodeName;
		[DataMember]
		public string CodeName { 
		    get{
		        return _CodeName;
		    } 
		    set{
		        this.OnCodeNameChanging(value);
                this.SendPropertyChanging();
                this._CodeName = value;
                this.SendPropertyChanged("CodeName");
                this.OnCodeNameChanged();
		    }
		}
		
        partial void OnEnglishNameChanging(string value);
        partial void OnEnglishNameChanged();
		
		private string _EnglishName;
		[DataMember]
		public string EnglishName { 
		    get{
		        return _EnglishName;
		    } 
		    set{
		        this.OnEnglishNameChanging(value);
                this.SendPropertyChanging();
                this._EnglishName = value;
                this.SendPropertyChanged("EnglishName");
                this.OnEnglishNameChanged();
		    }
		}
		
        partial void OnNativeNameChanging(string value);
        partial void OnNativeNameChanged();
		
		private string _NativeName;
		[DataMember]
		public string NativeName { 
		    get{
		        return _NativeName;
		    } 
		    set{
		        this.OnNativeNameChanging(value);
                this.SendPropertyChanging();
                this._NativeName = value;
                this.SendPropertyChanged("NativeName");
                this.OnNativeNameChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<CoreEntity> CoreEntities
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.CoreEntities
                       where items.Id == _Id
                       select items;
            }
        }

        public IQueryable<Domain> Domains
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.Domains
                       where items.LanguageId == _Id
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the aspnet_Profile table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.aspnet_Profile 
    /// </summary>
    [DataContract]
	public partial class aspnet_Profile:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public aspnet_Profile(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnUserIdChanging(Guid value);
        partial void OnUserIdChanged();
		
		private Guid _UserId;
		[DataMember]
		public Guid UserId { 
		    get{
		        return _UserId;
		    } 
		    set{
		        this.OnUserIdChanging(value);
                this.SendPropertyChanging();
                this._UserId = value;
                this.SendPropertyChanged("UserId");
                this.OnUserIdChanged();
		    }
		}
		
        partial void OnPropertyNamesChanging(string value);
        partial void OnPropertyNamesChanged();
		
		private string _PropertyNames;
		[DataMember]
		public string PropertyNames { 
		    get{
		        return _PropertyNames;
		    } 
		    set{
		        this.OnPropertyNamesChanging(value);
                this.SendPropertyChanging();
                this._PropertyNames = value;
                this.SendPropertyChanged("PropertyNames");
                this.OnPropertyNamesChanged();
		    }
		}
		
        partial void OnPropertyValuesStringChanging(string value);
        partial void OnPropertyValuesStringChanged();
		
		private string _PropertyValuesString;
		[DataMember]
		public string PropertyValuesString { 
		    get{
		        return _PropertyValuesString;
		    } 
		    set{
		        this.OnPropertyValuesStringChanging(value);
                this.SendPropertyChanging();
                this._PropertyValuesString = value;
                this.SendPropertyChanged("PropertyValuesString");
                this.OnPropertyValuesStringChanged();
		    }
		}
		
        partial void OnPropertyValuesBinaryChanging(byte[] value);
        partial void OnPropertyValuesBinaryChanged();
		
		private byte[] _PropertyValuesBinary;
		[DataMember]
		public byte[] PropertyValuesBinary { 
		    get{
		        return _PropertyValuesBinary;
		    } 
		    set{
		        this.OnPropertyValuesBinaryChanging(value);
                this.SendPropertyChanging();
                this._PropertyValuesBinary = value;
                this.SendPropertyChanged("PropertyValuesBinary");
                this.OnPropertyValuesBinaryChanged();
		    }
		}
		
        partial void OnLastUpdatedDateChanging(DateTime value);
        partial void OnLastUpdatedDateChanged();
		
		private DateTime _LastUpdatedDate;
		[DataMember]
		public DateTime LastUpdatedDate { 
		    get{
		        return _LastUpdatedDate;
		    } 
		    set{
		        this.OnLastUpdatedDateChanging(value);
                this.SendPropertyChanging();
                this._LastUpdatedDate = value;
                this.SendPropertyChanged("LastUpdatedDate");
                this.OnLastUpdatedDateChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<aspnet_User> aspnet_Users
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.aspnet_Users
                       where items.UserId == _UserId
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the aspnet_Roles table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.aspnet_Role 
    /// </summary>
    [DataContract]
	public partial class aspnet_Role:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public aspnet_Role(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnApplicationIdChanging(Guid value);
        partial void OnApplicationIdChanged();
		
		private Guid _ApplicationId;
		[DataMember]
		public Guid ApplicationId { 
		    get{
		        return _ApplicationId;
		    } 
		    set{
		        this.OnApplicationIdChanging(value);
                this.SendPropertyChanging();
                this._ApplicationId = value;
                this.SendPropertyChanged("ApplicationId");
                this.OnApplicationIdChanged();
		    }
		}
		
        partial void OnRoleIdChanging(Guid value);
        partial void OnRoleIdChanged();
		
		private Guid _RoleId;
		[DataMember]
		public Guid RoleId { 
		    get{
		        return _RoleId;
		    } 
		    set{
		        this.OnRoleIdChanging(value);
                this.SendPropertyChanging();
                this._RoleId = value;
                this.SendPropertyChanged("RoleId");
                this.OnRoleIdChanged();
		    }
		}
		
        partial void OnRoleNameChanging(string value);
        partial void OnRoleNameChanged();
		
		private string _RoleName;
		[DataMember]
		public string RoleName { 
		    get{
		        return _RoleName;
		    } 
		    set{
		        this.OnRoleNameChanging(value);
                this.SendPropertyChanging();
                this._RoleName = value;
                this.SendPropertyChanged("RoleName");
                this.OnRoleNameChanged();
		    }
		}
		
        partial void OnLoweredRoleNameChanging(string value);
        partial void OnLoweredRoleNameChanged();
		
		private string _LoweredRoleName;
		[DataMember]
		public string LoweredRoleName { 
		    get{
		        return _LoweredRoleName;
		    } 
		    set{
		        this.OnLoweredRoleNameChanging(value);
                this.SendPropertyChanging();
                this._LoweredRoleName = value;
                this.SendPropertyChanged("LoweredRoleName");
                this.OnLoweredRoleNameChanged();
		    }
		}
		
        partial void OnDescriptionChanging(string value);
        partial void OnDescriptionChanged();
		
		private string _Description;
		[DataMember]
		public string Description { 
		    get{
		        return _Description;
		    } 
		    set{
		        this.OnDescriptionChanging(value);
                this.SendPropertyChanging();
                this._Description = value;
                this.SendPropertyChanged("Description");
                this.OnDescriptionChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<aspnet_Application> aspnet_Applications
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.aspnet_Applications
                       where items.Id == _ApplicationId
                       select items;
            }
        }

        public IQueryable<aspnet_UsersInRole> aspnet_UsersInRoles
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.aspnet_UsersInRoles
                       where items.RoleId == _RoleId
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the sysdiagrams table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.sysdiagram 
    /// </summary>
    [DataContract]
	public partial class sysdiagram:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public sysdiagram(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnnameChanging(string value);
        partial void OnnameChanged();
		
		private string _name;
		[DataMember]
		public string name { 
		    get{
		        return _name;
		    } 
		    set{
		        this.OnnameChanging(value);
                this.SendPropertyChanging();
                this._name = value;
                this.SendPropertyChanged("name");
                this.OnnameChanged();
		    }
		}
		
        partial void Onprincipal_idChanging(int value);
        partial void Onprincipal_idChanged();
		
		private int _principal_id;
		[DataMember]
		public int principal_id { 
		    get{
		        return _principal_id;
		    } 
		    set{
		        this.Onprincipal_idChanging(value);
                this.SendPropertyChanging();
                this._principal_id = value;
                this.SendPropertyChanged("principal_id");
                this.Onprincipal_idChanged();
		    }
		}
		
        partial void Ondiagram_idChanging(int value);
        partial void Ondiagram_idChanged();
		
		private int _diagram_id;
		[DataMember]
		public int diagram_id { 
		    get{
		        return _diagram_id;
		    } 
		    set{
		        this.Ondiagram_idChanging(value);
                this.SendPropertyChanging();
                this._diagram_id = value;
                this.SendPropertyChanged("diagram_id");
                this.Ondiagram_idChanged();
		    }
		}
		
        partial void OnversionChanging(int? value);
        partial void OnversionChanged();
		
		private int? _version;
		[DataMember]
		public int? version { 
		    get{
		        return _version;
		    } 
		    set{
		        this.OnversionChanging(value);
                this.SendPropertyChanging();
                this._version = value;
                this.SendPropertyChanged("version");
                this.OnversionChanged();
		    }
		}
		
        partial void OndefinitionChanging(byte[] value);
        partial void OndefinitionChanged();
		
		private byte[] _definition;
		[DataMember]
		public byte[] definition { 
		    get{
		        return _definition;
		    } 
		    set{
		        this.OndefinitionChanging(value);
                this.SendPropertyChanging();
                this._definition = value;
                this.SendPropertyChanged("definition");
                this.OndefinitionChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
    
    /// <summary>
    /// A class which represents the aspnet_UsersInRoles table in the xtraclub Database.
    /// This class is queryable through xtraclubDB.aspnet_UsersInRole 
    /// </summary>
    [DataContract]
	public partial class aspnet_UsersInRole:BaseEntity, INotifyPropertyChanging, INotifyPropertyChanged
	{
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
	    
	    public aspnet_UsersInRole(){
	        OnCreated();
	    }
	    
	    #region Properties
	    
        partial void OnUserIdChanging(Guid value);
        partial void OnUserIdChanged();
		
		private Guid _UserId;
		[DataMember]
		public Guid UserId { 
		    get{
		        return _UserId;
		    } 
		    set{
		        this.OnUserIdChanging(value);
                this.SendPropertyChanging();
                this._UserId = value;
                this.SendPropertyChanged("UserId");
                this.OnUserIdChanged();
		    }
		}
		
        partial void OnRoleIdChanging(Guid value);
        partial void OnRoleIdChanged();
		
		private Guid _RoleId;
		[DataMember]
		public Guid RoleId { 
		    get{
		        return _RoleId;
		    } 
		    set{
		        this.OnRoleIdChanging(value);
                this.SendPropertyChanging();
                this._RoleId = value;
                this.SendPropertyChanged("RoleId");
                this.OnRoleIdChanged();
		    }
		}
		

        #endregion

        #region Foreign Keys
        public IQueryable<aspnet_Role> aspnet_Roles
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.aspnet_Roles
                       where items.RoleId == _RoleId
                       select items;
            }
        }

        public IQueryable<aspnet_User> aspnet_Users
        {
            get
            {
                  var db=new xtra.domain.Subsonic3.xtraclubDB();
                  return from items in db.aspnet_Users
                       where items.UserId == _UserId
                       select items;
            }
        }

        #endregion


        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
        public event PropertyChangingEventHandler PropertyChanging;
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void SendPropertyChanging()
        {
            var handler = PropertyChanging;
            if (handler != null)
               handler(this, emptyChangingEventArgs);
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

	}
	
}